/*
 * @Date: 2021-04-20 20:54:16
 * @LastEditors: kanoyami
 * @LastEditTime: 2021-05-28 21:31:46
 */
const counts = {}
const config = require("../../config/config.json")
module.exports = function (gift, room) {
    const roomid = room.toString()
    if (gift.giftName === '香蕉') {
        if (counts[roomid]) {
            counts[roomid] += gift.count
        } else {
            counts[roomid] = gift.count
        }
        if(counts[roomid] / config.step > 10) return 10
        return Math.floor(counts[roomid] / config.step) || 1
    }
}